package com.his.registration.service;

import com.his.dto.CheckCharge;
import com.his.dto.CheckResult;
import com.his.registration.pojo.CheckRequest;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @BelongsProject: workspace-idea
 * @BelongsPackage: com.his.registration.service
 * @Author: ZhangYing
 * @Date: 2023/7/2 15:51
 * @Description:
 */
public interface CheckRequestService {
    //查询患者所有的检查费用
    public List<CheckCharge> getCheckFee(int registerId);

    //缴费
    public int charge(String drugState,int id);

    //开设检查时：点击确认后在对应表中插入挂号id、医技id、开立时间、状态
    public int insert(int registerId, int medicalTechnologyId, LocalDateTime creationTime, String checkState);

    //得到刚刚插入的id
    public int getInsertId();

    //根据检查id查询
    @Select("select * from check_request where id=#{id}")
    public CheckRequest selectById(int id);

    //在得到id的基础上添加其他数据
    public int updateOthers(int id,String checkInfo,String checkPosition,String checkRemark);

    //根据id删除
    public int deleteById(int id);

    //搜索挂号id对应的检查结果信息
    public List<CheckResult> getCheckByRegisterId(int registerId);
}
